export function echart1() {
  return {
    title: {
      text: '',
      left: 'center',
      top: 20,
      textStyle: {
        color: '#ccc'
      }
    },

    tooltip: {
      trigger: 'item'
    },

    visualMap: {
      show: false,
      min: 80,
      max: 600,
      inRange: {
        colorLightness: [0, 1]
      }
    },
    series: [{
      name: '访问来源',
      type: 'pie',
      radius: '55%',
      center: ['50%', '50%'],
      data: [{
          value: 410,
          name: '410 汉族'
        },
        {
          value: 285,
          name: '285 满族'
        },
        {
          value: 274,
          name: '274 蒙古族'
        },
        {
          value: 235,
          name: '235 壮族'
        }
      ].sort(function (a, b) {
        return a.value - b.value;
      }),
      roseType: 'radius',
      label: {
        color: 'rgba(255, 255, 255, 1)'
      },
      labelLine: {
        lineStyle: {
          color: 'rgba(255, 255, 255, 0.3)'
        },
        smooth: 0.2,
        length: 10,
        length2: 20
      },
      itemStyle: {
        color: '#1db7e5',
        shadowBlur: 200,
        shadowColor: 'rgba(0, 0, 0, 0.5)'
      },
      animationType: 'scale',
      animationEasing: 'elasticOut',
      animationDelay: function (idx) {
        return Math.random() * 200;
      }
    }]
  };
}
export function echart2() {
  return {
    color: ['#2f89cf'],
    tooptip: {
      trigger: "axis",
      axisPointer: {
        type: "shadow"
      },
    },
    grid: {
      left: "1%",
      top: "30px",
      right: "1%",
      bottom: "6%",
      containLabel: true
    },
    axisLabel: {
      color: "#fff",
      fontSize: "12"
    },
    xAxis: {
      type: 'category',
      data: ['空置房', '7人以上', '自有房屋', '出租房', '重点人员'],
      axisTick: {
        alignWithLabel: true
      },
      axisLabel: {
        color: "#fff",
        fontSize: "12"
      },
      axisLine: {
        show: false

      },
    },
    yAxis: {
      type: 'value',
      axisLabel: {
        color: "#fff",
        fontSize: "12"
      },
      axisLine: {
        show: false
      },
      splitLine: {
        lineStyle: {
          color: "rgba(255,255,255,.1)",
          width: 2
        }
      },
    },
    series: [{
      name: "直接访问",
      data: [{
        value: 50,
        itemStyle: {
          color: '#4754be'
        }
      }, {
        value: 80,
        itemStyle: {
          color: '#005396'
        }
      }, {
        value: 78,
        itemStyle: {
          color: '#55b3bf'
        }
      }, {
        value: 63,
        itemStyle: {
          color: '#665fb7'
        }
      }, {
        value: 59,
        itemStyle: {
          color: '#b9b3ab'
        }
      }],
      type: 'bar',
      barWidth: "25%",
    }]
  };
}
export function echart3() {
  return {
    color: ['#2f89cf'],
    tooptip: {
      trigger: "axis",
      axisPointer: {
        type: "shadow"
      }
    },
    grid: {
      left: "10%",
      top: "30px",
      right: "10%",
      bottom: "6%",
      containLabel: true
    },
    axisLabel: {
      color: "#fff",
      fontSize: "12"
    },
    xAxis: {
      type: 'category',
      data: ['怀安县', '太平庄乡', '王虎屯乡', '西沙城乡', '第六屯乡'],
      axisTick: {
        alignWithLabel: true
      },
      axisLabel: {
        color: "#fff",
        fontSize: "12"
      },
      axisLine: {
        show: false

      },
    },
    yAxis: {
      type: 'value',
      axisLabel: {
        color: "#fff",
        fontSize: "12"
      },
      axisLine: {
        show: false
      },
      splitLine: {
        lineStyle: {
          color: "rgba(255,255,255,.1)",
          width: 2
        }
      },
    },
    series: [{
      name: "直接访问",
      data: [93, 80, 78, 63, 59],
      type: 'bar',
      barWidth: "25%",
    }]
  };
}
export function echarts4() {
  return{
    tooltip: {
      trigger: 'item'
    },
    legend: {
      top: '5%',
      left: 'center',
      itemWidth: 10,
      itemHeight: 10,
      itemStyle: {
        borderWidth: 0,
        borderType: 'dashed'
      },
      textStyle: {
        color: '#0aafc6'
      }
    },
    series: [{
      name: '访问来源',
      type: 'pie',
      radius: ['40%', '70%'],
      avoidLabelOverlap: false,
      itemStyle: {
        borderRadius: 5,
        borderColor: '#fff',
        borderWidth: 2
      },
      label: {
        show: false,
        position: 'center'
      },
      emphasis: {
        label: {
          show: true,
          fontSize: '20',
          fontWeight: 'bold'
        }
      },
      labelLine: {
        show: false
      },
      data: [{
          value: 1048,
          name: '煤矿业'
        },
        {
          value: 735,
          name: '制造业'
        },
        {
          value: 580,
          name: '房地产业'
        },
        {
          value: 484,
          name: '软件业'
        },
        {
          value: 300,
          name: '超市'
        }
      ]
    }]
  };
}